public class Compare {
    public static int  com2(int a,int b){

        return a>b?a:b;
    }
    public static int com3(int a,int b,int c){
        int temp = com2(a,b);
        return com2(temp,c);
       // return (a>b?a:b)>c?(a>b?a:b):c;
    }

    public static void main(String[] args) {
        int a = 10;
        int b = 20;
        int c = 30;
        System.out.println(com2(a,b));
        System.out.println(com3(a,b,c));
    }
}
